package com.example.abstractfactory;

/**
 * @version 1.0.0
 * @className: TestAbstractFactory
 * @description:
 * @author: rosszhang
 * @date: 2022/5/13 12:25
 */
public class TestAbstractFactory {
    public static void main(String[] args) {
        AbstractFactory factory = new DefaultFactory();
        Vehicle v = factory.createVehicle();
        v.run();
        System.out.println();
        Food f = factory.createFood();
        f.printName();
        System.out.println();
        Weapon w = factory.createWeapon();
        w.ak47();
    }
}
